package com.yihu.cms.service;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.yihu.beans.ArtworkAuthor;
import com.yihu.cms.action.BaseController;
import com.yihu.dataService.hessian.mongodb.interfaceService.ArtworkAuthorHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;


public class ArtworkAuthorService {
	
	
	public List<ArtworkAuthor> getAll() {
		List<ArtworkAuthor> result = new ArrayList<ArtworkAuthor>();
		try {
			ArtworkAuthorHService artworkAuthor = (ArtworkAuthorHService) ResourceMongoDBManager
					.getSingleton().getBeans("artworkAuthorHSC");

			result = artworkAuthor.getAllArtworkAuthor();
		} catch (MalformedURLException e) {
			System.out.println(e.toString());
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		
		return result;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
